/**
 * 
 */
package com.android.weibogo;

import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.ImageButton;

/**
 * @author Administrator
 *
 */
public class ImageButtonTouchListener implements OnTouchListener {

	@Override
	public boolean onTouch(View view, MotionEvent event) {
		ImageButton imgBtn = ((ImageButton)view);
		if(event.getAction()==MotionEvent.ACTION_DOWN){
			imgBtn.getDrawable().setAlpha(150);
			imgBtn.invalidate();
		}else{
			imgBtn.getDrawable().setAlpha(255);
			imgBtn.invalidate();
		}
		return false;
	}

}
